#ifndef _BINARYSORTTREE_H_
#define _BINARYSORTTREE_H_

#define ElementType int 
struct BinaryTreeNode
{
    ElementType data;
    struct BinaryTreeNode *left;
    struct BinaryTreeNode *right;
    struct BinaryTreeNode *parent;
};
typedef struct BinaryTreeNode BTNode;

struct LinkBinaryTree
{
    BTNode *root;
};
typedef struct LinkBinaryTree LBTree;

int InitLBTree(LBTree *tree,ElementType value);
void InsertNode(LBTree *tree,ElementType element);
void MidTravel(LBTree *tree);
void PrevTravel(LBTree *tree);
void PostTravel(LBTree *tree);
void FreeTree(LBTree *tree);
void DeleteElement(LBTree *tree,ElementType element);
BTNode *SearchElement(LBTree *tree,ElementType element);


#endif